<script>
import Draggable from 'vuedraggable'
import dict from '../../dictionary/setting-panel.js'
import { getUiItemExtraForEditable, generateOperateButtons } from '../mixins.js'

export default {
  props: ['id', 'fullField', 'shortField', 'value'],
  functional: true,
  render (h, context) {
    const editable = context.props.editable
    const extra = editable
      ? generateOperateButtons(h, context)
      : []
    return h('div', getUiItemExtraForEditable(context), [
      h('Event', {
        props: {
          setting: context.props
        }
      }),
      ...extra
    ])
  }
}
</script>
